Nagios : Add Monitoring Target Item
2015/02/23 |
It's possible to add monitoring Target Items.
There are many RPM packages for them or it's possible to create a plugin by yourself.
And also there are many plugins provided by comunity below.
⇒ http://exchange.nagios.org/ |
|
[1] | Many plugins are provided with RPM packages like follows. |
# use EPEL repository [root@dlp ~]# yum --enablerepo=epel search nagios-plugins- nagios-plugins-all.x86_64 : Nagios Plugins - All plugins nagios-plugins-apt.x86_64 : Nagios Plugin - check_apt nagios-plugins-bdii.x86_64 : Nagios Plugin - check_bdii_entries nagios-plugins-bonding.x86_64 : Nagios plugin to monitor Linux bonding interfaces nagios-plugins-breeze.x86_64 : Nagios Plugin - check_breeze ... ... nagios-plugins-ups.x86_64 : Nagios Plugin - check_ups nagios-plugins-users.x86_64 : Nagios Plugin - check_users nagios-plugins-wave.x86_64 : Nagios Plugin - check_wave |
[2] | For example, add check_ntp plugin to monitor time difference between the system and NTP server. |
[root@dlp ~]#
yum --enablerepo=epel -y install nagios-plugins-ntp
[root@dlp ~]#
vi /etc/nagios/objects/commands.cfg # add follows to the end define command{ command_name check_ntp_time command_line $USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$ }
[root@dlp ~]#
vi /etc/nagios/objects/localhost.cfg # add follows to the end ( Warning if it has 1 sec time difference, Critical if it has 2 sec ) define service{ use local-service host_name localhost service_description NTP_TIME check_command check_ntp_time!ntp1.jst.mfeed.ad.jp!1!2 notifications_enabled 1 } /etc/rc.d/init.d/nagios reload Running configuration check...done. Reloading nagios configuration...done |
[3] | It's possible to view the status for a new plugin on the admin site. |